package com.lazy.utils.mybatis.constant;


import lombok.Data;

/**
 * @author zk
 * @since 2018/5/23 17:26
 */
public enum ActiveEnum {
	TEST("测试环境",1),
	DEV("开发环境",2);

	private String desc;
	private Integer value;

	ActiveEnum(String desc, int value) {
		this.desc = desc;
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public static String getDesc(int value) {
		for (ActiveEnum c : ActiveEnum.values()) {
			if (c.getValue() == value) {
				return c.desc;
			}
		}
		return null;
	}

}
